module.exports = {
  gender: {
    M: 'MALE',
    F: 'FEMAL',
    U: 'UNKNOWN',
  },
  idType: {
    EMPL: 'EMPLOYMENT PASS',
    NRIC: 'NRIC',
    PASS: 'PASSPORT',
    UNKN: 'UNKNOWN',
    WORK: 'WORK PERMIT',
  },
  enquiryType: {
    NA: 'NEW APPLICATION',
    RV: 'REVIEW',
    GT: 'Guarantor',
    CE: 'Commercial Enquiry',
    B0: 'Blended Score enquiry',
    B1: 'Consumer Enquiry For ECRWPIBS',
    B2: 'Consumer Enquiry for ECRWPICRBS',
  },
  productType: {
    BL: 'BRIDGING LOAN',
    CC: 'CREDIT CARD',
    CM: 'REPAYMENT ASSISTANCE SCHEME',
    DC: 'Debt Consolidation Loan',
    HD: 'HDB Loan',
    MT: 'MARGIN TRADING ACCOUNT',
    MV: 'MOTOR VEHICLE LOAN',
    OD: 'OVERDRAFT',
    OT: 'OTHER',
    PC: 'Partially Secured Credit Card',
    PL: 'PERSONAL LOAN',
    PO: 'PARTIALLY SECURED OVERDRAFT',
    PP: 'PARTIALLY SECURED PERSONAL LOANS',
    PR: 'PRIVATE REAL ESTATE LOAN',
    RE: 'RENOVATION LOAN',
    RL: 'REAL ESTATE LOAN',
    RS: 'Restructured Loan',
    RV: 'REVIEW',
    SC: 'SECURED CREDIT CARD',
    SF: 'SELF',
    SL: 'STUDY LOAN',
    SO: 'SECURED OVERDRAFT',
    SP: 'SECURED PERSONAL LOAN',
    SR: 'Secured Restructured Loan',
    UC: 'UNSECURED CREDIT CARD',
    UO: 'UNSECURED OVERDRAFT',
    UP: 'UNSECURED PERSONAL LOAN',
  },
  addressType: {
    RESID: 'RESIDENTIAL',
    WORK: 'WORK',
    POST: 'POST/MAIL',
    U: 'UNKNOWN',
  },
  applicantType: {
    G: 'GUARANTOR',
    J: 'JOINT',
    P: 'PRIMARY',
    S: 'SECONDARY',
  },
  maritalStatus: {
    D: 'DIVORCED',
    M: 'MARRIED',
    P: 'SEPARATED',
    S: 'SINGLE',
    U: 'UNKNOWN',
    W: 'WIDOW/WIDOWER',
  },
  accountType: {
    J: 'JOINT',
    S: 'SINGLE ',
  },
  defaultStatus: {
    NS: 'NEGOTIATED SETTLEMENT',
    FS: 'FULL SETTLEMENT',
    PP: 'PARTIAL PAYMENT',
    OS: 'OUTSTANDING',
    SD: 'SOLD OFF',
  },
  drsStatus: {
    C: 'Completed',
    F: 'Failed',
    I: 'In Progress',
    IA: 'Certificate of Inapplicability issued under Section 56L',
    U: 'Under Assessment',
    US: 'Unsuitable for DRS Matter referred to Court ',
  },
  narrativeType: {
    GEN: 'General',
    DEBT: 'Debt Management Programme',
    '224': 'Fraud Cases',
    DEBTR: 'Debt Management - Payment',
    IDTHF: 'ID Theft ',
  },
  getKey(dic, v) {
    const keys = Object.keys(dic)
    return keys.map(k => dic[k]).reduce((s, e, i) => (e === v ? keys[i] : s), '')
  },
}
